<template>
  <div>
    <ul class="secKill">
      <li v-for="item in data" :key="item.proid" @click="jumpTo(item.proid)">
        <van-image width="80" height="80" :src="item.img1" />
        <p class="active">￥{{ item.originprice }}</p>
      </li>
    </ul>
  </div>
</template>

<script>
import { getSecKill } from "../../api/home";
import Vue from "vue";
import { Image as VanImage } from "vant";
Vue.use(VanImage);
export default {
  data() {
    return {
      data: [],
    };
  },
  created() {
    getSecKill().then((data) => {
      console.log(data.data.data);
      this.data = data.data.data;
    });
  },
  methods: {
    jumpTo(proid) {
      this.$router.push("/detail/" + proid);
    },
  },
};
</script>

<style scoped>
.secKill {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  overflow: auto;
}
.active {
  color: #ee0a24;
  text-align: center;
}
</style>